package com.xy.blog.core.converter.beans;

import org.springframework.beans.BeanUtils;

/**
 * @author zanhonglei
 * @version V1.0
 * @Description:
 * @date 2020/3/4
 */
public class BeanConverter<SOURCE,TARGET> {

    /**
     * 属性转换
     * @param source
     * @return
     */
    public static<SOURCE,TARGET> TARGET copy(SOURCE source) {
        Object target = new Object();
        BeanUtils.copyProperties(source,target);
        return (TARGET) target;
    }

}
